package cn.baiweigang.uu.enums;

public enum StrategyEnum {
    MA_3P("MA_3P", "三炮策略选股"),
    CHANGE_PM("CHANGE_PM", "排名变动率选股"),
    ;
    private String code;
    private String desc;

    StrategyEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static StrategyEnum getPeriodEnumByCode(String code) {
        StrategyEnum[] periodEnums = values();
        for (int i = 0; i < periodEnums.length; i++) {
            if (code != null && code.equalsIgnoreCase(periodEnums[i].getCode())) {
                return periodEnums[i];
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
